package com.example.time_manage_web.service.impl;

import com.example.time_manage_web.mapper.TodoMapper;
import com.example.time_manage_web.pojo.Todolist;
import com.example.time_manage_web.service.TodoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @BelongsProject: time_manage_web
 * @BelongsPackage: com.example.time_manage_web.service.impl
 * @Author: fox
 * @CreateTime: 2023-02-14  20:52
 * @Description: TODO
 * @Version: 1.0
 */
@Service("tosolistService")
public class TodoServiceImpl implements TodoService {

    @Autowired
    private TodoMapper todoMapper;
    @Override
    public List<Todolist> queryTodolist() {
        return  this.todoMapper.queryTodolist();
    }

    @Override
    public int insert(Todolist todolist) {
        int a =this.todoMapper.insertTodo(todolist);
        return a;
    }

    @Override
    public int update(Todolist todolist){
        int a = this.todoMapper.updateTodolist(todolist);
        return a;
    }

    @Override
    public int delete(Todolist todolist) {
        int a = this.todoMapper.deleteTodolist(todolist);
        return a;
    }
}
